#ifndef UNITTEST_H_INCLUDED
#define UNITTEST_H_INCLUDED

#include "StackAllocator.h"

namespace CEngine {

class UnitTest {
    public:

        struct Test{
            CHAR*   testName;
            U8      groupID;
            bool    result;
        };

        ///UnitTest constructor.
        ///allows for up to 128 groups and 1024 tests.
        UnitTest(void);

        ///Destructor.
        ~UnitTest(void);

        ///Creates a test group, and copies the name to the stack.
        void
        createTestGroup(const CHAR* testGroup);

        ///Creates a test with the given name and results.
        ///test is not created if the group doesn't exist.
        void
        test(const CHAR* testGroup, const CHAR* testName, bool result);

        ///prints the results to console.
        void
        printResults(void) const;

    private:

        StackAllocator  stack;
        U64             *groupName;
        Test            *tests;
        U32             testCount;
        U8              groupCount;
};

}

#endif // UNITTEST_H_INCLUDED
